Conversation
| void FactoryProducer::produce( | ||
| const fixed_point_t input_modifier, const fixed_point_t throughput_modifier, const fixed_point_t output_modifier | ||
| ) { | ||
| std::map<PopType const* const, fixed_point_t> employees_per_job {}; |
There was a problem hiding this comment.
This could be cached as a private field.
There was a problem hiding this comment.
Yeah this definitely should be cached, we'll also need it for tooltips
There was a problem hiding this comment.
I think tooltips should be calculated on demand. It saves a memory and ensures the tooltips are up to date.
| } | ||
|
|
||
| void FactoryProducer::produce( | ||
| const fixed_point_t input_modifier, const fixed_point_t throughput_modifier, const fixed_point_t output_modifier |
There was a problem hiding this comment.
I imagine the country calls some method on each state, which calls this method for each factory.
The country & state create the modifier values here.
Hop311
left a comment
There was a problem hiding this comment.
Great work with the equations, nice to see that we already have all these components available.
| void FactoryProducer::produce( | ||
| const fixed_point_t input_modifier, const fixed_point_t throughput_modifier, const fixed_point_t output_modifier | ||
| ) { | ||
| std::map<PopType const* const, fixed_point_t> employees_per_job {}; |
There was a problem hiding this comment.
Yeah this definitely should be cached, we'll also need it for tooltips
f275652 to
57b7a64
Compare
b004547 to
1c0505e
Compare
First pass at pops (test pops and density mapmode)
TODO: